/***************************************************
 @Name :        小铭同学
 @Time :        2025-09-03
 @Email :       LiaoMingWJ233@163.com
 @Comment :     风扇驱动
 @FileName :    fandevice.cpp
 @Version :     1.0
****************************************************/


#include "fandevice.h"

FanDevice::FanDevice(QObject *parent) : QObject(parent)
{
    fan_init();
}

void FanDevice::FanControl(char *buf){
    int ret = fan_pwm(buf);
    if(ret < 0)
    {
        qDebug()<<"control faile";
    }
}

void FanDevice::FanTurnOff(){
    int ret = fan_off();
    if(ret < 0)
    {
        qDebug()<<"turn off faile";
    }
}

FanDevice::~FanDevice()
{
    
}
